#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main() {
    int a, b, c, d;
    float sum;
    scanf("%d %d %d %d", &a, &b, &c, &d);
    sum = a * (1.0 / 5) + b * (1.0 / 10) + c * (1.0 / 5) + d * (1.0 / 2);
    printf("%.1f", sum);
    return 0;
}